﻿<!DOCTYPE HTML>
<html>
{include file='public/head'}
<body>
<style>
	.pager{
		margin: 0 auto;
		width: 50px ;
		overflow:hidden;
		font-size:30px;
	}
	.pager li:first-child{
		float: left;

	}
	.pager li:last-child{
		float:right;
	}
</style>
<nav class="breadcrumb"><i class="Hui-iconfont">&#xe67f;</i> 首页 <span class="c-gray en">&gt;</span> 成绩管理 <span class="c-gray en">&gt;</span> 评分系统 <a class="btn btn-success radius r" style="line-height:1.6em;margin-top:3px" href="javascript:location.replace(location.href);" title="刷新" ><i class="Hui-iconfont">&#xe68f;</i></a></nav>
<div class="page-container">
	<div class="text-c">
		<form action="{:url('admin/score/scorelist')}" method="post">
			<input type="text" class="input-text" style="width:250px" placeholder="输入学生名称" id="name" name="name">
			<button type="submit" class="btn btn-success" id="" name=""><i class="Hui-iconfont">&#xe665;</i> 搜用户</button>
		</form>
	</div>
	<div class="cl pd-5 bg-1 bk-gray mt-20" style="float: left; border: none;background-color: white">

	</div>
		<form class="form form-horizontal" id="form-admin-add">
	<table class="table table-border table-bordered table-bg">
		<thead>
			<tr>
				<th scope="col" colspan="14">学生列表</th>
			</tr>
			<tr class="text-c">
				<th width="40">ID</th>
				<th width="80">姓名</th>
				<th width="80">班级</th>
				<th width="80">周考一</th>
				<th width="80">周考二</th>
				<th width="80">周考三</th>
				<th width="80">周考四</th>
				<th width="80">阶段考</th>
				<th width="80">阶段性补考</th>
				<th width="80">项目分</th>
				<th width="80">日常分</th>
				<th width="80">总平均分</th>
				<th width="100">日常行为操作</th>
				<th width="80">成绩详情</th>
			</tr>
		</thead>
		<tbody>
		{volist name='student' id='vo'}
			<tr class="text-c">
				<td>{$vo.id}</td>
				<td>
					<a href="javascript:;" onclick="details('详情','{:url(\"admin/student/details\")}','{$vo.id}','800','500')" ">{$vo.student_name}</a>
				</td>
				<td>{$vo.classroom.class_name}</td>
				<td>
                    <input type="text" class="input-text" value="{$vo.score.one}" id="One" name="one" onblur="scoreChage('{$vo.id}',this.value,this.name)"
						   {between name="vo.score.one" value="1,69"} style="color: red" {/between} >
                </td>
				<td>
                    <input type="text" class="input-text" value="{$vo.score.two}"id="Two" name="two" onblur="scoreChage('{$vo.id}',this.value,this.name)"
						   {between name="vo.score.two" value="1,69"} style="color: red" {/between} >
                </td>
				<td>
                    <input type="text" class="input-text" value="{$vo.score.three}"id="Three" name="three" onblur="scoreChage('{$vo.id}',this.value,this.name)"
						   {between name="vo.score.three" value="1,69"} style="color: red" {/between} >
                </td>
				<td>
                    <input type="text" class="input-text" value="{$vo.score.four}"id="Four" name="four" onblur="scoreChage('{$vo.id}',this.value,this.name)"
						   {between name="vo.score.four" value="1,69"} style="color: red" {/between} >
                </td>
				<td>
                    <input type="text" class="input-text" value="{$vo.score.five}"id="Five" name="five" onblur="scoreChage('{$vo.id}',this.value,this.name)"
						   {between name="vo.score.five" value="1,69"} style="color: red" {/between} >
                </td>
				<td>
					<input type="text" class="input-text" value="{$vo.score.six}"id="six" name="six" onblur="scoreChage('{$vo.id}',this.value,this.name)"
						   {between name="vo.score.six" value="1,69"} style="color: red" {/between} >
				</td>
				<td>
					<input type="text" class="input-text" value="{$vo.score.seven}"id="seven" name="seven" onblur="scoreChage('{$vo.id}',this.value,this.name)"
						   {between name="vo.score.seven" value="1,69"} style="color: red" {/between} >
				</td>
				<td>
					<a href="javascript:;" onclick="everydetails('日常详情','{:url(\"admin/score/EveryDetails\")}','{$vo.id}','800','500')" ">{$vo.score.everyday}</a>
				</td>
				<td>{$vo.avg}</td>
				<td>
					<a href="javascript:;" onclick="everyDay('日常行为记录','{:url(\"admin/score/EveryDay\")}','{$vo.id}','600','600')" class="btn btn-primary radius">
					<i class="Hui-iconfont"></i>日常行为操作
					</a>
				</td>
				<td>
					<a href="javascript:;" onclick="ScoreDetails('成绩详情','{:url(\"admin/score/ScoreDetails\")}','{$vo.id}','800','400')" class="btn btn-primary radius">
						<i class="Hui-iconfont"></i>成绩详情
				</td>
			</tr>
		{/volist}
		</tbody>
	</table>
			</form>
	{if $Think.session.auth['aid'] == 32}
	{$page}
	{/if}

</div>
<!--_footer 作为公共模版分离出去-->
{include file='public/foot'}<!--/_footer 作为公共模版分离出去-->
<!--请在下方写此页面业务相关的脚本-->
<script type="text/javascript" src="/static/lib/My97DatePicker/4.8/WdatePicker.js"></script>
<script type="text/javascript" src="/static/lib/datatables/1.10.0/jquery.dataTables.min.js"></script>
<script type="text/javascript" src="/static/lib/laypage/1.2/laypage.js"></script>
<script type="text/javascript">
function scoreChage(id,val,name){
    $.ajax({
        type:'post',
        data:{'id':id,'score':val,'examination':name},
        dataType:'json',
        url:'{:url("admin/score/scorelist")}',
        success:function (data) {
            if (data.status == 1) {
                layer.msg(data.msg, {icon: 1, time: 1000,});
            } else {
                layer.msg(data.msg, {icon: 2, time: 1000});
            }
        },
    })
}

function ScoreDetails(title,url,id,w,h) {
    layer_show(title,url+'?id='+id,w,h);
}

function everyDay(title,url,id,w,h) {
    layer_show(title,url+'?id='+id,w,h);
}

function details(title,url,id,w,h){
    layer_show(title,url+'?id='+id,w,h);
}
function everydetails(title,url,id,w,h){
    layer_show(title,url+'?id='+id,w,h);
}
</script>
</body>
</html>